
#If Not (PocketPC OrElse Smartphone) Then
<ComponentModel.DefaultProperty("data")> _
Public Class adjustableDate
#Else
Public Class adjustableDate
#End If
    Implements IComparable
    Public data As Date

    Public Function CompareTo(ByVal obj As Object) As Integer Implements System.IComparable.CompareTo
        Dim right As Date = convertor.cast(Of adjustableDate)(obj).data
        Return data.CompareTo(right)
    End Function

    Public Sub New(ByVal i As Date)
        data = i
    End Sub

    Public Sub New()
        data = DateTime.Now
    End Sub

    Public Shared Widening Operator CType(ByVal i As Date) As adjustableDate
        Return New adjustableDate(i)
    End Operator

    Public Shared Widening Operator CType(ByVal i As adjustableDate) As Date
        Return i.data
    End Operator

    Public Shared Operator +(ByVal left As adjustableDate, ByVal right As adjustableDate) As adjustableDate
        Return New Date(left.data.Ticks + right.data.Ticks)
    End Operator

    Public Shared Operator -(ByVal left As adjustableDate, ByVal right As adjustableDate) As adjustableDate
        Return New Date(left.data.Ticks - right.data.Ticks)
    End Operator

    Public Overrides Function ToString() As String
        Return Convert.ToString(data)
    End Function

    Public Overrides Function GetHashCode() As Integer
        Return data.GetHashCode()
    End Function
End Class
